import express from 'express';
import { CourseController } from '../controllers/courseController.js';
import { authenticateToken } from '../middleware/auth.js';

const router = express.Router();
const courseController = new CourseController();

// 获取课程列表
router.get('/', courseController.getCourses.bind(courseController));

// 获取课程选项
router.get('/options', courseController.getCourseOptions.bind(courseController));

// 创建课程
router.post('/', courseController.createCourse.bind(courseController));

// 更新课程
router.put('/:id', courseController.updateCourse.bind(courseController));

// 删除课程
router.delete('/:id', courseController.deleteCourse.bind(courseController));

export default router;